package scalapackage.testfanxing

/**
  * Created by Germmy on 2018/4/15.
  */
class ViewBoundDemo[T <% Ordered[T]] {
  def select(g1:T,g2:T) ={
    if (g1 > g2) g1 else g2;
  }
}


object  ViewBoundDemo{
  def main(args: Array[String]) {
    import  testimplicit.MyPreDef.selectGirl
    val vbd= new ViewBoundDemo[MyGirl]
    val g1=new MyGirl("biaozi",20,120)
    val g2=new MyGirl("erdiao",15,120)
    val g3=vbd.select(g1,g2)
    println(g3.name)
  }
}

class  MyGirl(val name:String,val age:Int,val faceValue:Int){

}

